<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: edmlrare.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00137.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">edmlrare.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03620_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00137_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a9c10c49d201455207eb7b5d33fdcbaad"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a9c10c49d201455207eb7b5d33fdcbaad">MLInsertCrCrLf</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped)</td></tr>
<tr class="separator:a9c10c49d201455207eb7b5d33fdcbaad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e345646d6394ad3c63bdc2eca957f51"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a9e345646d6394ad3c63bdc2eca957f51">MLStripCrCrLf</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped)</td></tr>
<tr class="separator:a9e345646d6394ad3c63bdc2eca957f51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d1da051c6ee9841fcea47e78769535e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a5d1da051c6ee9841fcea47e78769535e">MLSetHandle</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, HANDLE hNewText)</td></tr>
<tr class="separator:a5d1da051c6ee9841fcea47e78769535e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b9926ae49db861e1d67443176c1c992"><td class="memItemLeft" align="right" valign="top">LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a8b9926ae49db861e1d67443176c1c992">MLGetLine</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> lineNumber, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> maxCchToCopy, LPSTR lpBuffer)</td></tr>
<tr class="separator:a8b9926ae49db861e1d67443176c1c992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf93e5f7d7016a03d94d3e21009e2f45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#abf93e5f7d7016a03d94d3e21009e2f45">MLLineIndex</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> iLine)</td></tr>
<tr class="separator:abf93e5f7d7016a03d94d3e21009e2f45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdfb782141efea18b23e905096871b74"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#afdfb782141efea18b23e905096871b74">MLLineLength</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> ich)</td></tr>
<tr class="separator:afdfb782141efea18b23e905096871b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7baf2e1b509f1e23c307a9173510c1fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a7baf2e1b509f1e23c307a9173510c1fc">MLSetSelection</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, BOOL fDoNotScrollCaret, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> ichMinSel, <a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> ichMaxSel)</td></tr>
<tr class="separator:a7baf2e1b509f1e23c307a9173510c1fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af53270e71c0c0c04df0649fa81cb1f79"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#af53270e71c0c0c04df0649fa81cb1f79">MLSetTabStops</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped, int nTabPos, LPINT lpTabStops)</td></tr>
<tr class="separator:af53270e71c0c0c04df0649fa81cb1f79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9308247f8c76ebe9c9a7e68668856ffb"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html#a9308247f8c76ebe9c9a7e68668856ffb">MLUndo</a> (<a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a> ped)</td></tr>
<tr class="separator:a9308247f8c76ebe9c9a7e68668856ffb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="a8b9926ae49db861e1d67443176c1c992"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b9926ae49db861e1d67443176c1c992">&#9670;&nbsp;</a></span>MLGetLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG MLGetLine </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>lineNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>maxCchToCopy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPSTR&#160;</td>
          <td class="paramname"><em>lpBuffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00263">263</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;{</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    PSTR pText;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> cchLen;</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="keywordflow">if</span> (lineNumber &gt; ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a> - 1) {</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_INVALID_PARAMETER,</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;                <span class="stringliteral">&quot;Invalid parameter \&quot;lineNumber\&quot; (%ld) to MLGetLine&quot;</span>,</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                lineNumber);</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="keywordflow">return</span> 0L;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    }</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    cchLen = <a class="code" href="a00128.html#aafac7e536d40b6456dc6409b5929f705">MLLine</a>(ped, lineNumber);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    maxCchToCopy = min(cchLen, maxCchToCopy);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">if</span> (maxCchToCopy) {</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        pText = <a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped) +</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[lineNumber] * ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        memmove(lpBuffer, pText, maxCchToCopy*ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <a class="code" href="a00125.html#ac702f10c1226a0b63d07046ab3bb69f2">ECUnlock</a>(ped);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160; </div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordflow">return</span> maxCchToCopy;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00742">tagED::cbChar</a>, <a class="el" href="a00257_source.html#l00743">tagED::chLines</a>, <a class="el" href="a00257_source.html#l00649">tagED::cLines</a>, <a class="el" href="a00125_source.html#l00038">ECLock()</a>, <a class="el" href="a00125_source.html#l00072">ECUnlock()</a>, <a class="el" href="a00128_source.html#l00311">MLLine()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00120">RIPERR1</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="a9c10c49d201455207eb7b5d33fdcbaad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c10c49d201455207eb7b5d33fdcbaad">&#9670;&nbsp;</a></span>MLInsertCrCrLf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL MLInsertCrCrLf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>fAnsi</p>

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00024">24</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> dch;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> li;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> lineSize;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pchText;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pchTextNew;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">if</span> (!ped-&gt;<a class="code" href="a01901.html#a37bdf3472a25ade90d92aafe2a063113">fWrap</a> || !ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>) {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">         * There are no soft line breaks if word-wrapping is off or if no chars</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    }</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">     * Calc an upper bound on the number of additional characters we will be</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">     * adding to the text when we insert CR CR LFs.</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    dch = 3 * ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a03263.html#a3cad893343901f718a04a83fa675a98f">LOCALREALLOC</a>(ped-&gt;<a class="code" href="a01901.html#a28b575c23d3fd50bf4af8b5fa4d240ad">hText</a>, (ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> + dch) * ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>, 0, ped-&gt;<a class="code" href="a01901.html#aa4e24199aacde3c2ea82d9be4f6ce37a">hInstance</a>, NULL)) {</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <a class="code" href="a00125.html#a1a1b70e84040ea5b89332b2153855e5e">ECNotifyParent</a>(ped, EN_ERRSPACE);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    ped-&gt;<a class="code" href="a01901.html#a9805d549bc2a7caaea2b1b51cf39d444">cchAlloc</a> = ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> + dch;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment">     * Move the text up dch bytes and then copy it back down, inserting the CR</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">     * CR LF&#39;s as necessary.</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    pchTextNew = pchText = <a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    pchText += dch * ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment">     * We will use dch to keep track of how many chars we add to the text</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    dch = 0;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment">     * Copy the text up dch bytes to pchText. This will shift all indices in</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment">     * ped-&gt;chLines up by dch bytes.</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    memmove(pchText, pchTextNew, ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> * ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">     * Now copy chars from pchText down to pchTextNew and insert CRCRLF at soft</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">     * line breaks.</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#afeee4bc01f4c0be43cb8f89d23474f7c">fAnsi</a>) {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">for</span> (li = 0; li &lt; ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a> - 1; li++) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            lineSize = ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[li + 1] - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[li];</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            memmove(pchTextNew, pchText, lineSize);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            pchTextNew += lineSize;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            pchText += lineSize;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">             * If last character in newly copied line is not a line feed, then we</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">             * need to add the CR CR LF triple to the end</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="keywordflow">if</span> (*(pchTextNew - 1) != 0x0A) {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                *pchTextNew++ = 0x0D;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                *pchTextNew++ = 0x0D;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                *pchTextNew++ = 0x0A;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                dch += 3;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="comment">         * Now move the last line up. It won&#39;t have any line breaks in it...</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        memmove(pchTextNew, pchText, ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a> - 1]);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    } <span class="keywordflow">else</span> { </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        LPWSTR pwchTextNew = (LPWSTR)pchTextNew;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">for</span> (li = 0; li &lt; ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a> - 1; li++) {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            lineSize = ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[li + 1] - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[li];</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            memmove(pwchTextNew, pchText, lineSize * <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;            pwchTextNew += lineSize;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            pchText += lineSize * <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">             * If last character in newly copied line is not a line feed, then we</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="comment">             * need to add the CR CR LF triple to the end</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="keywordflow">if</span> (*(pwchTextNew - 1) != 0x0A) {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                *pwchTextNew++ = 0x0D;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                *pwchTextNew++ = 0x0D;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                *pwchTextNew++ = 0x0A;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                dch += 3;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="comment">         * Now move the last line up. It won&#39;t have any line breaks in it...</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        memmove(pwchTextNew, pchText,</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            (ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[ped-&gt;<a class="code" href="a01901.html#ae6ba237f88595c95385cfd18629c0440">cLines</a> - 1]) * <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <a class="code" href="a00125.html#ac702f10c1226a0b63d07046ab3bb69f2">ECUnlock</a>(ped);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordflow">if</span> (dch) {</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">         * Update number of characters in text handle</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> += dch;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">         * So that the next time we do anything with the text, we can strip the</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="comment">         * CRCRLFs</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        ped-&gt;<a class="code" href="a01901.html#abdb553e929a7f2716bedda4dc121c0b1">fStripCRCRLF</a> = TRUE;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00742">tagED::cbChar</a>, <a class="el" href="a00257_source.html#l00647">tagED::cch</a>, <a class="el" href="a00257_source.html#l00643">tagED::cchAlloc</a>, <a class="el" href="a00257_source.html#l00743">tagED::chLines</a>, <a class="el" href="a00257_source.html#l00649">tagED::cLines</a>, <a class="el" href="a00125_source.html#l00038">ECLock()</a>, <a class="el" href="a00125_source.html#l01833">ECNotifyParent()</a>, <a class="el" href="a00125_source.html#l00072">ECUnlock()</a>, <a class="el" href="a00257_source.html#l00729">tagED::fAnsi</a>, <a class="el" href="a00257_source.html#l00713">tagED::fStripCRCRLF</a>, <a class="el" href="a00257_source.html#l00704">tagED::fWrap</a>, <a class="el" href="a00257_source.html#l00791">tagED::hInstance</a>, <a class="el" href="a00257_source.html#l00642">tagED::hText</a> , 以及 <a class="el" href="a03263_source.html#l00106">LOCALREALLOC</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="abf93e5f7d7016a03d94d3e21009e2f45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf93e5f7d7016a03d94d3e21009e2f45">&#9670;&nbsp;</a></span>MLLineIndex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> MLLineIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>iLine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00303">303</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;{</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    <span class="keywordflow">if</span> (iLine == -1)</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        iLine = ped-&gt;<a class="code" href="a01901.html#ac76a7989aa1c24ad1a29af0132be8ff7">iCaretLine</a>;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keywordflow">if</span> (iLine &lt; ped-&gt;cLines) {</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        <span class="keywordflow">return</span> ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[iLine];</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_INVALID_PARAMETER,</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                <span class="stringliteral">&quot;Invalid parameter \&quot;iLine\&quot; (%ld) to MLLineIndex&quot;</span>,</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;                iLine);</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160; </div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>)-1;</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    }</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00743">tagED::chLines</a>, <a class="el" href="a00257_source.html#l00656">tagED::iCaretLine</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00120">RIPERR1</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="afdfb782141efea18b23e905096871b74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdfb782141efea18b23e905096871b74">&#9670;&nbsp;</a></span>MLLineLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> MLLineLength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>ich</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00331">331</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;{</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> il1, il2;</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> temp;</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160; </div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="keywordflow">if</span> (ich != 0xFFFFFFFF)</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="a00128.html#aafac7e536d40b6456dc6409b5929f705">MLLine</a>(ped, <a class="code" href="a00128.html#af3e5aea0575d44a8ef1733bae71b52d4">MLIchToLine</a>(ped, ich)));</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160; </div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="comment">     * Find length of lines corresponding to current selection</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    il1 = <a class="code" href="a00128.html#af3e5aea0575d44a8ef1733bae71b52d4">MLIchToLine</a>(ped, ped-&gt;<a class="code" href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">ichMinSel</a>);</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    il2 = <a class="code" href="a00128.html#af3e5aea0575d44a8ef1733bae71b52d4">MLIchToLine</a>(ped, ped-&gt;<a class="code" href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">ichMaxSel</a>);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <span class="keywordflow">if</span> (il1 == il2)</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="a00128.html#aafac7e536d40b6456dc6409b5929f705">MLLine</a>(ped, il1) - (ped-&gt;<a class="code" href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">ichMaxSel</a> - ped-&gt;<a class="code" href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">ichMinSel</a>));</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160; </div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    temp = ped-&gt;<a class="code" href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">ichMinSel</a> - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[il1];</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    temp += <a class="code" href="a00128.html#aafac7e536d40b6456dc6409b5929f705">MLLine</a>(ped, il2);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    temp -= (ped-&gt;<a class="code" href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">ichMaxSel</a> - ped-&gt;<a class="code" href="a01901.html#aef1eec499715335d467d1c4215278b99">chLines</a>[il2]);</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    <span class="keywordflow">return</span> temp;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00743">tagED::chLines</a>, <a class="el" href="a00257_source.html#l00653">tagED::ichMaxSel</a>, <a class="el" href="a00257_source.html#l00651">tagED::ichMinSel</a>, <a class="el" href="a00128_source.html#l00377">MLIchToLine()</a> , 以及 <a class="el" href="a00128_source.html#l00311">MLLine()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="a5d1da051c6ee9841fcea47e78769535e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d1da051c6ee9841fcea47e78769535e">&#9670;&nbsp;</a></span>MLSetHandle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MLSetHandle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HANDLE&#160;</td>
          <td class="paramname"><em>hNewText</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00219">219</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;{</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> newCch;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> = ped-&gt;<a class="code" href="a01901.html#a9805d549bc2a7caaea2b1b51cf39d444">cchAlloc</a> =</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            <a class="code" href="a03263.html#ad50a3e865471912a6158e295b616eb64">LOCALSIZE</a>(ped-&gt;<a class="code" href="a01901.html#a28b575c23d3fd50bf4af8b5fa4d240ad">hText</a> = hNewText, ped-&gt;<a class="code" href="a01901.html#aa4e24199aacde3c2ea82d9be4f6ce37a">hInstance</a>) / ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    ped-&gt;<a class="code" href="a01901.html#af5a010828a8c661a2bc93df0260b2c86">fEncoded</a> = FALSE;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>) {</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment">         * We have to do it this way in case the app gives us a zero size handle</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#afeee4bc01f4c0be43cb8f89d23474f7c">fAnsi</a>)</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> = strlen(<a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped));</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> = wcslen((LPWSTR)<a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped));</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <a class="code" href="a00125.html#ac702f10c1226a0b63d07046ab3bb69f2">ECUnlock</a>(ped);</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    newCch = (<a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>)(ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> + CCHALLOCEXTRA);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="comment">     * We do this LocalReAlloc in case the app changed the size of the handle</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03263.html#a3cad893343901f718a04a83fa675a98f">LOCALREALLOC</a>(ped-&gt;<a class="code" href="a01901.html#a28b575c23d3fd50bf4af8b5fa4d240ad">hText</a>, newCch*ped-&gt;<a class="code" href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">cbChar</a>, 0, ped-&gt;<a class="code" href="a01901.html#aa4e24199aacde3c2ea82d9be4f6ce37a">hInstance</a>, NULL))</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        ped-&gt;<a class="code" href="a01901.html#a9805d549bc2a7caaea2b1b51cf39d444">cchAlloc</a> = newCch;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <a class="code" href="a00125.html#a8515ac4587cc6a22b32dc46c97be4d83">ECResetTextInfo</a>(ped);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00742">tagED::cbChar</a>, <a class="el" href="a00257_source.html#l00647">tagED::cch</a>, <a class="el" href="a00257_source.html#l00643">tagED::cchAlloc</a>, <a class="el" href="a00125_source.html#l00038">ECLock()</a>, <a class="el" href="a00125_source.html#l01945">ECResetTextInfo()</a>, <a class="el" href="a00125_source.html#l00072">ECUnlock()</a>, <a class="el" href="a00257_source.html#l00729">tagED::fAnsi</a>, <a class="el" href="a00257_source.html#l00793">tagED::fEncoded</a>, <a class="el" href="a00257_source.html#l00791">tagED::hInstance</a>, <a class="el" href="a00257_source.html#l00642">tagED::hText</a>, <a class="el" href="a03263_source.html#l00106">LOCALREALLOC</a> , 以及 <a class="el" href="a03263_source.html#l00112">LOCALSIZE</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="a7baf2e1b509f1e23c307a9173510c1fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7baf2e1b509f1e23c307a9173510c1fc">&#9670;&nbsp;</a></span>MLSetSelection()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MLSetSelection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fDoNotScrollCaret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>ichMinSel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>&#160;</td>
          <td class="paramname"><em>ichMaxSel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00365">365</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;{</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    HDC hdc;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keywordflow">if</span> (ichMinSel == 0xFFFFFFFF) {</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160; </div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;<span class="comment">         * Set no selection if we specify -1</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        ichMinSel = ichMaxSel = ped-&gt;<a class="code" href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">ichCaret</a>;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    }</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160; </div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;<span class="comment">     * Since these are unsigned, we don&#39;t check if they are greater than 0.</span></div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    ichMinSel = min(ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>, ichMinSel);</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    ichMaxSel = min(ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>, ichMaxSel);</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160; </div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="comment">     * Set the caret&#39;s position to be at ichMaxSel.</span></div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    ped-&gt;<a class="code" href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">ichCaret</a> = ichMaxSel;</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    ped-&gt;<a class="code" href="a01901.html#ac76a7989aa1c24ad1a29af0132be8ff7">iCaretLine</a> = <a class="code" href="a00128.html#af3e5aea0575d44a8ef1733bae71b52d4">MLIchToLine</a>(ped, ped-&gt;<a class="code" href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">ichCaret</a>);</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; </div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    hdc = <a class="code" href="a00125.html#a8442f6745c1edc096b532bf21606e25a">ECGetEditDC</a>(ped, FALSE);</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    <a class="code" href="a00128.html#abbf6ac9595d5cf96ba37b77a8e39f955">MLChangeSelection</a>(ped, hdc, ichMinSel, ichMaxSel);</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160; </div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <a class="code" href="a00128.html#ad7765faa70b41215dd1e14efa082ca34">MLSetCaretPosition</a>(ped, hdc);</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <a class="code" href="a00125.html#a343438939eedd81fc70a8ab0e6214112">ECReleaseEditDC</a>(ped, hdc, FALSE);</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160; </div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="preprocessor">#ifdef KOREA</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;<span class="comment">     * Extra parameter specified interim character mode</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    <a class="code" href="a00128.html#aebad30f9124918a4eb9bee23075c3072">MLEnsureCaretVisible</a>(ped,NULL);</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    <span class="keywordflow">if</span> (!fDoNotScrollCaret)</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        <a class="code" href="a00128.html#aebad30f9124918a4eb9bee23075c3072">MLEnsureCaretVisible</a>(ped);</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00647">tagED::cch</a>, <a class="el" href="a00125_source.html#l01890">ECGetEditDC()</a>, <a class="el" href="a00125_source.html#l01922">ECReleaseEditDC()</a>, <a class="el" href="a00257_source.html#l00656">tagED::iCaretLine</a>, <a class="el" href="a00257_source.html#l00654">tagED::ichCaret</a>, <a class="el" href="a00128_source.html#l00716">MLChangeSelection()</a>, <a class="el" href="a00128_source.html#l02924">MLEnsureCaretVisible()</a>, <a class="el" href="a00128_source.html#l00377">MLIchToLine()</a> , 以及 <a class="el" href="a00128_source.html#l00240">MLSetCaretPosition()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a> , 以及 <a class="el" href="a00137_source.html#l00523">MLUndo()</a>.</p>

</div>
</div>
<a id="af53270e71c0c0c04df0649fa81cb1f79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af53270e71c0c0c04df0649fa81cb1f79">&#9670;&nbsp;</a></span>MLSetTabStops()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL MLSetTabStops </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nTabPos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPINT&#160;</td>
          <td class="paramname"><em>lpTabStops</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00429">429</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;{</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <span class="keywordtype">int</span> *pTabStops;</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160; </div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;<span class="comment">     * Check if tab positions already exist</span></div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    <span class="keywordflow">if</span> (!ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a>) {</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160; </div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;<span class="comment">         * Check if the caller wants the new tab positions</span></div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        <span class="keywordflow">if</span> (nTabPos) {</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160; </div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;<span class="comment">             * Allocate the array of tab stops</span></div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;            <span class="keywordflow">if</span> (!(pTabStops = (LPINT)UserLocalAlloc(HEAP_ZERO_MEMORY, (nTabPos + 1) * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>)))) {</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;                <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;            }</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <span class="keywordflow">return</span> TRUE; <span class="comment">/* No stops then and no stops now! */</span></div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        }</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160; </div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="comment">         * Check if the caller wants the new tab positions</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;        <span class="keywordflow">if</span> (nTabPos) {</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160; </div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;<span class="comment">             * Check if the number of tab positions is different</span></div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;            <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a>[0] != nTabPos) {</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160; </div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="comment">                 * Yes! So ReAlloc to new size</span></div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;                <span class="keywordflow">if</span> (!(pTabStops = (LPINT)UserLocalReAlloc(ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a>,</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;                        (nTabPos + 1) * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>), 0)))</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;                    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;                pTabStops = ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a>;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;            }</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160; </div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;<span class="comment">             * Caller wants to remove all the tab stops; So, release</span></div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;            <span class="keywordflow">if</span> (!UserLocalFree(ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a>))</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;                <span class="keywordflow">return</span> FALSE;  <span class="comment">/* Failure */</span></div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;            ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a> = NULL;</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;            <span class="keywordflow">goto</span> RedrawAndReturn;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        }</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    }</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160; </div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="comment">     * Copy the new tab stops onto the tab stop array after converting the</span></div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;<span class="comment">     * dialog co-ordinates into the pixel co-ordinates</span></div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    ped-&gt;<a class="code" href="a01901.html#a00569140688ee86009f8509ad3304bd7">pTabStops</a> = pTabStops;</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    *pTabStops++ = nTabPos; <span class="comment">/* First element contains the count */</span></div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <span class="keywordflow">while</span> (nTabPos--) {</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160; </div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;<span class="comment">         * aveCharWidth must be used instead of cxSysCharWidth.</span></div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="comment">         * Fix for Bug #3871 --SANKAR-- 03/14/91</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        *pTabStops++ = MultDiv(*lpTabStops++, ped-&gt;<a class="code" href="a01901.html#ab660860ffa906bd4a4a19c2fda18f9d8">aveCharWidth</a>, 4);</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    }</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160; </div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;RedrawAndReturn:</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;    <span class="comment">// Because the tabstops have changed, we need to recompute the</span></div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;    <span class="comment">// maxPixelWidth. Otherwise, horizontal scrolls will have problems.</span></div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;    <span class="comment">// Fix for Bug #6042 - 3/15/94</span></div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    <a class="code" href="a00128.html#a7b8b5ce2c2de282a118f017cd70092e3">MLBuildchLines</a>(ped, 0, 0, FALSE, NULL, NULL);</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <a class="code" href="a00128.html#aebad30f9124918a4eb9bee23075c3072">MLEnsureCaretVisible</a>(ped);</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    <span class="comment">// Also, we need to redraw the whole window.</span></div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;    <a class="code" href="a00362.html#acfbb149ad39bc9929fb7063d4276e470">NtUserInvalidateRect</a>(ped-&gt;<a class="code" href="a01901.html#aa72255e7356d612ad72bb45def01fcbb">hwnd</a>, NULL, TRUE);</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00758">tagED::aveCharWidth</a>, <a class="el" href="a00257_source.html#l00674">tagED::hwnd</a>, <a class="el" href="a00128_source.html#l01261">MLBuildchLines()</a>, <a class="el" href="a00128_source.html#l02924">MLEnsureCaretVisible()</a>, <a class="el" href="a03614_source.html#l04092">NtUserInvalidateRect()</a> , 以及 <a class="el" href="a00257_source.html#l00765">tagED::pTabStops</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="a9e345646d6394ad3c63bdc2eca957f51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e345646d6394ad3c63bdc2eca957f51">&#9670;&nbsp;</a></span>MLStripCrCrLf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MLStripCrCrLf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00156">156</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;{</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>) {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#afeee4bc01f4c0be43cb8f89d23474f7c">fAnsi</a>) {</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pchSrc;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pchDst;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pchLast;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            pchSrc = pchDst = <a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            pchLast = pchSrc + ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            <span class="keywordflow">while</span> (pchSrc &lt; pchLast) {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                <span class="keywordflow">if</span> (   (pchSrc[0] == 0x0D)</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                    &amp;&amp; (pchSrc[1] == 0x0D)</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                    &amp;&amp; (pchSrc[2] == 0x0A)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                ) {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                    pchSrc += 3;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                    ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> -= 3;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                    *pchDst++ = *pchSrc++;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;            }</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        } <span class="keywordflow">else</span> { <span class="comment">// !fAnsi</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            LPWSTR pwchSrc;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            LPWSTR pwchDst;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            LPWSTR pwchLast;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            pwchSrc = pwchDst = (LPWSTR)<a class="code" href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a>(ped);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            pwchLast = pwchSrc + ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            <span class="keywordflow">while</span> (pwchSrc &lt; pwchLast) {</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                <span class="keywordflow">if</span> (   (pwchSrc[0] == 0x0D)</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                    &amp;&amp; (pwchSrc[1] == 0x0D)</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                    &amp;&amp; (pwchSrc[2] == 0x0A)</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                ) {</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                    pwchSrc += 3;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                    ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a> -= 3;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                    *pwchDst++ = *pwchSrc++;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            }</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="a00125.html#ac702f10c1226a0b63d07046ab3bb69f2">ECUnlock</a>(ped);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="comment">         * Make sure we don&#39;t have any values past the last character</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">ichCaret</a> &gt; ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>)</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            ped-&gt;<a class="code" href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">ichCaret</a>  = ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">ichMinSel</a> &gt; ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>)</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            ped-&gt;<a class="code" href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">ichMinSel</a> = ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        <span class="keywordflow">if</span> (ped-&gt;<a class="code" href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">ichMaxSel</a> &gt; ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>)</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            ped-&gt;<a class="code" href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">ichMaxSel</a> = ped-&gt;<a class="code" href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">cch</a>;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    }</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00647">tagED::cch</a>, <a class="el" href="a00125_source.html#l00038">ECLock()</a>, <a class="el" href="a00125_source.html#l00072">ECUnlock()</a>, <a class="el" href="a00257_source.html#l00729">tagED::fAnsi</a>, <a class="el" href="a00257_source.html#l00654">tagED::ichCaret</a>, <a class="el" href="a00257_source.html#l00653">tagED::ichMaxSel</a> , 以及 <a class="el" href="a00257_source.html#l00651">tagED::ichMinSel</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00125_source.html#l01945">ECResetTextInfo()</a> , 以及 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>.</p>

</div>
</div>
<a id="a9308247f8c76ebe9c9a7e68668856ffb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9308247f8c76ebe9c9a7e68668856ffb">&#9670;&nbsp;</a></span>MLUndo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL MLUndo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00257.html#ade4a1e740f9d06527c30eea655640da5">PED</a>&#160;</td>
          <td class="paramname"><em>ped</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00137_source.html">edmlrare.c</a> 第 <a class="el" href="a00137_source.html#l00523">523</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;{</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    HANDLE hDeletedText = ped-&gt;hDeletedText;</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;    BOOL fDelete = (BOOL)(ped-&gt;undoType &amp; UNDO_DELETE);</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> cchDeleted = ped-&gt;cchDeleted;</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    <a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a> ichDeleted = ped-&gt;ichDeleted;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160; </div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    <span class="keywordflow">if</span> (ped-&gt;undoType == UNDO_NONE) {</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160; </div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;<span class="comment">         * No undo...</span></div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    }</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160; </div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    ped-&gt;hDeletedText = NULL;</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;    ped-&gt;cchDeleted = 0;</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    ped-&gt;ichDeleted = (<a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>)-1;</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;    ped-&gt;undoType &amp;= ~UNDO_DELETE;</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160; </div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;    <span class="keywordflow">if</span> (ped-&gt;undoType == UNDO_INSERT) {</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;        ped-&gt;undoType = UNDO_NONE;</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160; </div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;<span class="comment">         * Set the selection to the inserted text</span></div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;        <a class="code" href="a00137.html#a7baf2e1b509f1e23c307a9173510c1fc">MLSetSelection</a>(ped, FALSE, ped-&gt;ichInsStart, ped-&gt;ichInsEnd);</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;        ped-&gt;ichInsStart = ped-&gt;ichInsEnd = (<a class="code" href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a>)-1;</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160; </div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;<span class="comment">         * Now send a backspace to delete and save it in the undo buffer...</span></div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;        SendMessage(ped-&gt;<a class="code" href="a01901.html#aa72255e7356d612ad72bb45def01fcbb">hwnd</a>, WM_CHAR, (WPARAM)VK_BACK, 0L);</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;    }</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160; </div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    <span class="keywordflow">if</span> (fDelete) {</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160; </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;<span class="comment">         * Insert deleted chars</span></div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160; </div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="comment">         * Set the selection to the inserted text</span></div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;        <a class="code" href="a00137.html#a7baf2e1b509f1e23c307a9173510c1fc">MLSetSelection</a>(ped, FALSE, ichDeleted, ichDeleted);</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        <a class="code" href="a00128.html#a37b047405749d0a781f1ac9815e29fd0">MLInsertText</a>(ped, hDeletedText, cchDeleted, FALSE);</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160; </div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;        UserGlobalFree(hDeletedText);</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <a class="code" href="a00137.html#a7baf2e1b509f1e23c307a9173510c1fc">MLSetSelection</a>(ped, FALSE, ichDeleted, ichDeleted + cchDeleted);</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    }</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160; </div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257_source.html#l00674">tagED::hwnd</a>, <a class="el" href="a00128_source.html#l00837">MLInsertText()</a> , 以及 <a class="el" href="a00137_source.html#l00365">MLSetSelection()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00128_source.html#l03002">MLEditWndProc()</a>, <a class="el" href="a00128_source.html#l00837">MLInsertText()</a> , 以及 <a class="el" href="a00128_source.html#l01035">MLReplaceSel()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa01901_html_a18ecf26174a7b4520ebc1d98a810f457"><div class="ttname"><a href="a01901.html#a18ecf26174a7b4520ebc1d98a810f457">tagED::cbChar</a></div><div class="ttdeci">WORD cbChar</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00742">usercli.h:742</a></div></div>
<div class="ttc" id="aa00125_html_a5235c9fe24a71a0fac1a6c9326d13ac8"><div class="ttname"><a href="a00125.html#a5235c9fe24a71a0fac1a6c9326d13ac8">ECLock</a></div><div class="ttdeci">PSTR ECLock(PED ped)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l00038">editec.c:38</a></div></div>
<div class="ttc" id="aa00125_html_a1a1b70e84040ea5b89332b2153855e5e"><div class="ttname"><a href="a00125.html#a1a1b70e84040ea5b89332b2153855e5e">ECNotifyParent</a></div><div class="ttdeci">void ECNotifyParent(PED ped, int notificationCode)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l01833">editec.c:1833</a></div></div>
<div class="ttc" id="aa01901_html_ae6ba237f88595c95385cfd18629c0440"><div class="ttname"><a href="a01901.html#ae6ba237f88595c95385cfd18629c0440">tagED::cLines</a></div><div class="ttdeci">ICH cLines</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00649">usercli.h:649</a></div></div>
<div class="ttc" id="aa00125_html_a8442f6745c1edc096b532bf21606e25a"><div class="ttname"><a href="a00125.html#a8442f6745c1edc096b532bf21606e25a">ECGetEditDC</a></div><div class="ttdeci">HDC ECGetEditDC(PED ped, BOOL fFastDC)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l01890">editec.c:1890</a></div></div>
<div class="ttc" id="aa01901_html_a23ca94d3e9305d791eae6e8aaacb581f"><div class="ttname"><a href="a01901.html#a23ca94d3e9305d791eae6e8aaacb581f">tagED::ichMaxSel</a></div><div class="ttdeci">ICH ichMaxSel</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00653">usercli.h:653</a></div></div>
<div class="ttc" id="aa01901_html_afeee4bc01f4c0be43cb8f89d23474f7c"><div class="ttname"><a href="a01901.html#afeee4bc01f4c0be43cb8f89d23474f7c">tagED::fAnsi</a></div><div class="ttdeci">UINT fAnsi</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00729">usercli.h:729</a></div></div>
<div class="ttc" id="aa01901_html_a3b759141b06c8b5281f3b2045e7cd00b"><div class="ttname"><a href="a01901.html#a3b759141b06c8b5281f3b2045e7cd00b">tagED::cch</a></div><div class="ttdeci">ICH cch</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00647">usercli.h:647</a></div></div>
<div class="ttc" id="aa01901_html_ab660860ffa906bd4a4a19c2fda18f9d8"><div class="ttname"><a href="a01901.html#ab660860ffa906bd4a4a19c2fda18f9d8">tagED::aveCharWidth</a></div><div class="ttdeci">int aveCharWidth</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00758">usercli.h:758</a></div></div>
<div class="ttc" id="aa01901_html_ac76a7989aa1c24ad1a29af0132be8ff7"><div class="ttname"><a href="a01901.html#ac76a7989aa1c24ad1a29af0132be8ff7">tagED::iCaretLine</a></div><div class="ttdeci">ICH iCaretLine</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00656">usercli.h:656</a></div></div>
<div class="ttc" id="aa00125_html_a343438939eedd81fc70a8ab0e6214112"><div class="ttname"><a href="a00125.html#a343438939eedd81fc70a8ab0e6214112">ECReleaseEditDC</a></div><div class="ttdeci">void ECReleaseEditDC(PED ped, HDC hdc, BOOL fFastDC)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l01922">editec.c:1922</a></div></div>
<div class="ttc" id="aa01901_html_abdb553e929a7f2716bedda4dc121c0b1"><div class="ttname"><a href="a01901.html#abdb553e929a7f2716bedda4dc121c0b1">tagED::fStripCRCRLF</a></div><div class="ttdeci">UINT fStripCRCRLF</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00713">usercli.h:713</a></div></div>
<div class="ttc" id="aa01901_html_aa72255e7356d612ad72bb45def01fcbb"><div class="ttname"><a href="a01901.html#aa72255e7356d612ad72bb45def01fcbb">tagED::hwnd</a></div><div class="ttdeci">HWND hwnd</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00674">usercli.h:674</a></div></div>
<div class="ttc" id="aa01901_html_aa4e24199aacde3c2ea82d9be4f6ce37a"><div class="ttname"><a href="a01901.html#aa4e24199aacde3c2ea82d9be4f6ce37a">tagED::hInstance</a></div><div class="ttdeci">HANDLE hInstance</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00791">usercli.h:791</a></div></div>
<div class="ttc" id="aa03263_html_ad50a3e865471912a6158e295b616eb64"><div class="ttname"><a href="a03263.html#ad50a3e865471912a6158e295b616eb64">LOCALSIZE</a></div><div class="ttdeci">#define LOCALSIZE(hMem, hInstance)</div><div class="ttdef"><b>Definition:</b> <a href="a03263_source.html#l00112">client/globals.h:112</a></div></div>
<div class="ttc" id="aa00137_html_a7baf2e1b509f1e23c307a9173510c1fc"><div class="ttname"><a href="a00137.html#a7baf2e1b509f1e23c307a9173510c1fc">MLSetSelection</a></div><div class="ttdeci">void MLSetSelection(PED ped, BOOL fDoNotScrollCaret, ICH ichMinSel, ICH ichMaxSel)</div><div class="ttdef"><b>Definition:</b> <a href="a00137_source.html#l00365">edmlrare.c:365</a></div></div>
<div class="ttc" id="aa03263_html_a3cad893343901f718a04a83fa675a98f"><div class="ttname"><a href="a03263.html#a3cad893343901f718a04a83fa675a98f">LOCALREALLOC</a></div><div class="ttdeci">#define LOCALREALLOC(hMem, dwBytes, dwFlags, hInstance, ppv)</div><div class="ttdef"><b>Definition:</b> <a href="a03263_source.html#l00106">client/globals.h:106</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa01901_html_af5a010828a8c661a2bc93df0260b2c86"><div class="ttname"><a href="a01901.html#af5a010828a8c661a2bc93df0260b2c86">tagED::fEncoded</a></div><div class="ttdeci">BOOL fEncoded</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00793">usercli.h:793</a></div></div>
<div class="ttc" id="aa00362_html_acfbb149ad39bc9929fb7063d4276e470"><div class="ttname"><a href="a00362.html#acfbb149ad39bc9929fb7063d4276e470">NtUserInvalidateRect</a></div><div class="ttdeci">BOOL NtUserInvalidateRect(IN HWND hwnd, IN CONST RECT *prect OPTIONAL, IN BOOL bErase)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04092">kernel/ntstubs.c:4092</a></div></div>
<div class="ttc" id="aa00128_html_aafac7e536d40b6456dc6409b5929f705"><div class="ttname"><a href="a00128.html#aafac7e536d40b6456dc6409b5929f705">MLLine</a></div><div class="ttdeci">ICH MLLine(PED ped, ICH lineNumber)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l00311">editml.c:311</a></div></div>
<div class="ttc" id="aa01901_html_a00569140688ee86009f8509ad3304bd7"><div class="ttname"><a href="a01901.html#a00569140688ee86009f8509ad3304bd7">tagED::pTabStops</a></div><div class="ttdeci">LPINT pTabStops</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00765">usercli.h:765</a></div></div>
<div class="ttc" id="aa00128_html_af3e5aea0575d44a8ef1733bae71b52d4"><div class="ttname"><a href="a00128.html#af3e5aea0575d44a8ef1733bae71b52d4">MLIchToLine</a></div><div class="ttdeci">int MLIchToLine(PED ped, ICH ich)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l00377">editml.c:377</a></div></div>
<div class="ttc" id="aa01901_html_a731ae5660a3e672f501d9e67ccda9c5e"><div class="ttname"><a href="a01901.html#a731ae5660a3e672f501d9e67ccda9c5e">tagED::ichMinSel</a></div><div class="ttdeci">ICH ichMinSel</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00651">usercli.h:651</a></div></div>
<div class="ttc" id="aa00125_html_ac702f10c1226a0b63d07046ab3bb69f2"><div class="ttname"><a href="a00125.html#ac702f10c1226a0b63d07046ab3bb69f2">ECUnlock</a></div><div class="ttdeci">void ECUnlock(PED ped)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l00072">editec.c:72</a></div></div>
<div class="ttc" id="aa01901_html_a9805d549bc2a7caaea2b1b51cf39d444"><div class="ttname"><a href="a01901.html#a9805d549bc2a7caaea2b1b51cf39d444">tagED::cchAlloc</a></div><div class="ttdeci">ICH cchAlloc</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00643">usercli.h:643</a></div></div>
<div class="ttc" id="aa00128_html_a37b047405749d0a781f1ac9815e29fd0"><div class="ttname"><a href="a00128.html#a37b047405749d0a781f1ac9815e29fd0">MLInsertText</a></div><div class="ttdeci">ICH MLInsertText(PED ped, LPSTR lpText, ICH cchInsert, BOOL fUserTyping)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l00837">editml.c:837</a></div></div>
<div class="ttc" id="aa00128_html_a7b8b5ce2c2de282a118f017cd70092e3"><div class="ttname"><a href="a00128.html#a7b8b5ce2c2de282a118f017cd70092e3">MLBuildchLines</a></div><div class="ttdeci">void MLBuildchLines(PED ped, ICH iLine, int cchDelta, BOOL fUserTyping, PLONG pll, PLONG phl)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l01261">editml.c:1261</a></div></div>
<div class="ttc" id="aa00128_html_aebad30f9124918a4eb9bee23075c3072"><div class="ttname"><a href="a00128.html#aebad30f9124918a4eb9bee23075c3072">MLEnsureCaretVisible</a></div><div class="ttdeci">BOOL MLEnsureCaretVisible(PED ped)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l02924">editml.c:2924</a></div></div>
<div class="ttc" id="aa00371_html_adbdd8355d15a97b6f3a9e4766e6a2cc1"><div class="ttname"><a href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a></div><div class="ttdeci">#define RIPERR1(idErr, flags, szFmt, p1)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00120">winerrp.h:120</a></div></div>
<div class="ttc" id="aa00365_html_ad92d5fac09a74e3695c68da781de646b"><div class="ttname"><a href="a00365.html#ad92d5fac09a74e3695c68da781de646b">ICH</a></div><div class="ttdeci">DWORD ICH</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00469">user.h:469</a></div></div>
<div class="ttc" id="aa01901_html_a37bdf3472a25ade90d92aafe2a063113"><div class="ttname"><a href="a01901.html#a37bdf3472a25ade90d92aafe2a063113">tagED::fWrap</a></div><div class="ttdeci">UINT fWrap</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00704">usercli.h:704</a></div></div>
<div class="ttc" id="aa01901_html_aef1eec499715335d467d1c4215278b99"><div class="ttname"><a href="a01901.html#aef1eec499715335d467d1c4215278b99">tagED::chLines</a></div><div class="ttdeci">LPICH chLines</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00743">usercli.h:743</a></div></div>
<div class="ttc" id="aa01901_html_ac1c361bb0c0b2a18ff893491b4ad939a"><div class="ttname"><a href="a01901.html#ac1c361bb0c0b2a18ff893491b4ad939a">tagED::ichCaret</a></div><div class="ttdeci">ICH ichCaret</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00654">usercli.h:654</a></div></div>
<div class="ttc" id="aa00128_html_ad7765faa70b41215dd1e14efa082ca34"><div class="ttname"><a href="a00128.html#ad7765faa70b41215dd1e14efa082ca34">MLSetCaretPosition</a></div><div class="ttdeci">void MLSetCaretPosition(PED ped, HDC hdc)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l00240">editml.c:240</a></div></div>
<div class="ttc" id="aa01901_html_a28b575c23d3fd50bf4af8b5fa4d240ad"><div class="ttname"><a href="a01901.html#a28b575c23d3fd50bf4af8b5fa4d240ad">tagED::hText</a></div><div class="ttdeci">HANDLE hText</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00642">usercli.h:642</a></div></div>
<div class="ttc" id="aa00125_html_a8515ac4587cc6a22b32dc46c97be4d83"><div class="ttname"><a href="a00125.html#a8515ac4587cc6a22b32dc46c97be4d83">ECResetTextInfo</a></div><div class="ttdeci">void ECResetTextInfo(PED ped)</div><div class="ttdef"><b>Definition:</b> <a href="a00125_source.html#l01945">editec.c:1945</a></div></div>
<div class="ttc" id="aa00128_html_abbf6ac9595d5cf96ba37b77a8e39f955"><div class="ttname"><a href="a00128.html#abbf6ac9595d5cf96ba37b77a8e39f955">MLChangeSelection</a></div><div class="ttdeci">void MLChangeSelection(PED ped, HDC hdc, ICH ichNewMinSel, ICH ichNewMaxSel)</div><div class="ttdef"><b>Definition:</b> <a href="a00128_source.html#l00716">editml.c:716</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00137.html">edmlrare.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
